const http = uni.$u.http
import store from '../store/index.js'
export default {
    login: (data) => http.post('/staff/login', data),
    register: (data) => http.post('/staff/register', data),
    // 用户详情
    memberDetail: (id) => http.get(`/staff/${id}`),
    memberUpdate: (data) => http.put(`/staff/${data.id}`, data),
    // 首页轮播
    bannerList: (type = 1) => http.get('/banner/list', { status: 1, type }),
    updateOrder: (data) => http.post(`/order/accept`, data),
    orderList: (data) => http.get('/order/staff', data),
    confirmOrder: (data) => http.post('/order/confirm', data),
    getUserInfo: (id) => http.get('/staff/' + id),
    balanceList: (data) => http.get('/balance/list', data),
    createBalance: (data) => http.post('/balance', data),
}
